package net.jjjshop.front.service.lbt;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import net.jjjshop.common.entity.lbt.BalanceResponse;
import net.jjjshop.common.entity.lbt.UserExtract;
import net.jjjshop.common.entity.lbt.UserExtractEntity;
import net.jjjshop.common.entity.lbt.UserExtractSearchRequest;
import net.jjjshop.front.param.user.UserExtractRequest;

import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;

public interface LbUserExtractService  extends IService<UserExtractEntity> {


    IPage<UserExtractEntity> getList(UserExtractSearchRequest request, Integer page, Integer limit);

    IPage<UserExtractEntity> getUserList( Integer page, Integer limit);
    /**
     * 提现申请
     * @return Boolean
     */
    Boolean extractApply(UserExtractRequest request);

    /**
     * 提现审核
     * @param id    提现申请id
     * @param status 审核状态 -1 未通过 0 审核中 1 已提现
     * @param backMessage   驳回原因
     * @return  审核结果
     */
    Boolean updateStatus(Integer id,Integer status,String backMessage);

    /**
     * 修改提现申请
     * @param id 申请id
     * @param userExtractRequest 具体参数
     */
    Boolean updateExtract(Integer id, UserExtractRequest userExtractRequest);

    /**
     * 提现总金额
     */
    BalanceResponse getBalance(String dateLimit);

    /**
     * 导出数据
     * @param request
     * @param httpServletResponse
     */
    void extractExport(UserExtractSearchRequest request,HttpServletResponse httpServletResponse) throws UnsupportedEncodingException;



}
